package org.apache.servicecomb.samples.practise.houserush.user.center.service;

import org.apache.servicecomb.samples.practise.houserush.user.center.aggregate.Building;
import org.apache.servicecomb.samples.practise.houserush.user.center.aggregate.House;
import org.apache.servicecomb.samples.practise.houserush.user.center.aggregate.Realestate;

import java.util.List;

/**
 * @Author: Snake Man
 * @system:
 * @DateTime: 2021/12/28 18:33
 * @Description:
 */
public interface RealestateService {

    //楼盘新增
    Realestate createRealesate(Realestate realestate);

    //楼盘查询
    Realestate findRealestate(Integer id);

    //查询所有楼盘
    List<Realestate> indexRealestates();

    //修改楼盘
    Realestate updateRealestate( Realestate realestate);

    //删除楼盘
    void removeRealestate(int id);

    //新增楼栋
    Building createBuilding(int realestateId, Building building);

    //查询楼栋信息
    Building findBuilding(Integer id);
    //修改楼栋信息
    Building updateBuilding(Building building);
    //删除楼栋
    void removeBuilding(Integer id);
    //查询楼盘下所有楼栋
    List<Building> indexBuildings(Integer realestateId);

    //新增房源
    House createHouse(Integer buildingId, House house);

    //查询房源信息
    House findHouse(Integer id);

    //查询某一楼栋下所有房源
    List<House> indexHouses(Integer buildingId);

    //修改房源
    House updateHouse(House house);
    //删除房源
    void removeHouse(Integer id);
    //锁定房源
    List<House> lockHousesForSale(List<Integer> ids);
    //解锁房源
    int updateReleaseLockingStattesForHouses(List<Integer> ids);
}
